1. Field of the Invention
The present invention relates to the field of computer programming, and more particularly to a method, system, and computer readable code for adapting receiver thresholds to improve rate-based flow control in a data communications network.
2. Description of the Related Art
Flow control is a technique known in the computer programming art whereby the rate at which data traffic sent into a data communications network is managed for various optimizations. If too much data is being sent from a sending component to a receiving component, the buffers in which data is stored at intermediate nodes along the path between them (or at the receiver itself) may overflow, causing loss of data packets or the need to resend them. Or, if the buffers do not actually overflow, the network may become congested under heavy transmission loads, resulting in delays and inefficiencies. On the other hand, if the sender has data to be sent, but is sending it at a very slow rate when excess capacity exists in the network, then network resources such as network bandwidth are not being used efficiently. Flow control involves monitoring the current conditions of the network, and adjusting the rate at which data is sent according to these conditions. When the network appears to be congested, the rate of sending new data messages into the network is reduced. When there appears to be excess capacity available, the rate of sending messages can be increased. In this manner, rate-based flow control xe2x80x9cadaptsxe2x80x9d transmission rates to the current network conditions.
A specific implementation of rate-based flow control will now be discussed, in order to clearly illustrate how this technique operates. The High Performance Routing or xe2x80x9cHPRxe2x80x9d technology developed by the International Business Machines Corporation (xe2x80x9cIBMxe2x80x9d) is a technique for optimizing routing and network availability in SNA (Systems Network Architecture) networks. HPR is also known in the art, and will not be described in detail herein. Rate-based flow control is used within HPR networks, and functions by having the sender component periodically send a message to the receiver component asking for feedback on the current transmission rate. In HPR terminology, the sender sends a xe2x80x9crate requestxe2x80x9d message, and the receiver""s response is a xe2x80x9crate replyxe2x80x9d message. The receiver""s reply tells the sender how, from the receiver""s perspective, the rate of sending data into the network ought to be changed. For example, the rate reply message may tell the sender to slow down (because the receiver believes the network is congested, or is experiencing buffers or queues that are at or near capacity). Alternatively, the rate reply message may tell the sender to speed up its transmission rate, or to continue without change to the rate.
The receiver makes the determination of how to respond to the sender by monitoring network conditions. In HPR, this is done by comparing delays in arrival of the rate request messages, as shown in FIG. 3. The sender sends a first rate request message at some time xe2x80x9cT1xe2x80x9d, which the receiver receives at some later time xe2x80x9cT2xe2x80x9d. The sender subsequently sends a second rate request message at a time xe2x80x9cT3xe2x80x9d, received by the receiver at time xe2x80x9cT4xe2x80x9d. Each rate request message contains the sender""s measurement interval (i.e. how much time elapsed between sending these two rate request messages), computed by the sender as T3 minus T1. The receiver then subtracts its own receive time T2 from T4, to determine how much time elapsed between its receipt of the two messages. When the interval between receiving T2 and T4 is greater than the interval between sending T1 and T3, this indicates that the second rate request message was slowed down during its traversal of the network (due, for example, to congestion), and is used as a representative measure of the conditions being experienced for other data messages between the same sender and receiver. The larger the difference between the receiver""s interval and the sender""s interval, the greater the delay that is being experienced in the network. Alternatively, if transmission through the network is improving, the difference in the intervals may be negative, indicating that perhaps the first message experienced network delays while the second did not.
In HPR""s flow control, the difference between the receiver""s interval and the sender""s interval is referred to as the xe2x80x9cdelay changexe2x80x9d. Delay change values are accumulated by the receiver over time, in a value referred to as the xe2x80x9cdelay change sumxe2x80x9d or summation, in order to achieve a smoothing effect in interpreting network conditions. That is, some delay change values will be positive, and some will be negative, as conditions fluctuate. By accumulating the values over time, the HPR flow control technique avoids overreacting to transient situations. When a representative value for the delay change sum (hereinafter, xe2x80x9cDCSxe2x80x9d) is available, it is compared to a predetermined threshold value. If the DCS is above the threshold, then too much delay is being experienced. This tells the receiver that the appropriate response for the rate reply message is xe2x80x9cslow downxe2x80x9d. If the DCS is below the threshold, the sender is told to xe2x80x9cspeed upxe2x80x9d.
The thresholds used in known flow control systems (including HPR), however, are fixed values. These fixed values are determined by static analysis of the system""s behavior under a certain set of conditions (such as a predicted number of simultaneous connections, the link capacity of the underlying connections, etc.). There are a number of drawbacks to using a fixed threshold value. For example, it may be that the existing conditions are different than expected, such that the static threshold does not properly control transmission rates. Or, link capacity may have been added to a bottlenecked link after the system became operational, as can occur when multi-link transmission groups are used. Aware of the drawbacks when using static thresholds, some rate-based flow control systems provide for a user to intervene and adjust the threshold values. This is quite error-prone, however, because a number of complex interrelated factors must be considered when choosing a proper threshold value. In addition, it provides only a temporary solution as conditions may change again, making the new threshold no longer adequate.
Accordingly, what is needed is a technique whereby threshold values can be dynamically adjusted to adapt to current network conditions, without requiring user intervention. The present invention addresses this problem by providing a technique for monitoring several different indicators of network conditions, and defines appropriate adjustments to be made to the thresholds upon detecting these specific indicators.
An object of the present invention is to provide a technique for dynamically adjusting receiver thresholds to adapt to current network conditions.
Another object of the present invention is to provide this technique without requiring user intervention.
A further object of the present invention is to provide this dynamic adjustment by monitoring specific indicators of network congestion.
Yet another object of the present invention is to provide this technique in a manner that detects the presence of protocols which do not use adaptive receiver thresholds for flow control, and to provide a threshold adaptation for this situation.
Still another object of the present invention is to provide receiver threshold adaptation using a software-implemented solution.
Other objects and advantages of the present invention will be set forth in part in the description and in the drawings which follow and, in part, will be obvious from the description or may be learned by practice of the invention.
To achieve the foregoing objects, and in accordance with the purpose of the invention as broadly described herein, the present invention provides a method, system, and computer-readable code for adapting receiver thresholds to improve rate-based flow control in a data communications network. In one aspect, this comprises: detecting a foreign protocol operating in the network; and setting a receiver threshold to a maximum value when the foreign protocol is detected. In another aspect, this comprises: monitoring a percentage of increase messages sent by a receiver to a sender during a recent interval; and using the percentage of increase messages to interpolate a receiver threshold between a maximum value and a minimum value. In a further aspect, this comprises: monitoring a link utilization rate of a connection during a recent interval; and using the link utilization rate to adjust a receiver threshold. In yet another aspect, this comprises: detecting a foreign protocol operating in the network; monitoring a percentage of increase messages sent by a receiver to a sender during a recent interval; monitoring a link utilization rate of a connection during the recent interval; setting a receiver threshold to a maximum value when the foreign protocol is detected; and setting the receiver threshold when the foreign protocol is not detected. In this aspect, setting the receiver threshold further comprises: using the percentage of increase messages to interpolate the receiver threshold between a maximum value and a minimum value; and using the link utilization rate to adjust the receiver threshold. The process of detecting a foreign protocol may further comprise: monitoring an average value of a delay change sum; monitoring a variance in the delay change sum; monitoring a responsiveness to one or more decrease messages; determining that the foreign protocol is detected when said the monitored average value is higher than an expected average value; determining that the foreign protocol is detected when the monitored variance is larger than an expected variance; and determining that the foreign protocol is detected when the monitored responsiveness is less than an expected responsiveness.
The present invention will now be described with reference to the following drawings, in which like reference numbers denote the same element throughout.